Refactor InterfaceGenerator into composable method generators#1147
Conversation
…dSignatureGenerator, and IMethodGenerator InterfaceGenerator reduced from 450 to 253 lines by extracting: - ReturnTypeGenerator: return type derivation, IApiResponse wrapping, Task/IObservable - MethodAttributeGenerator: Accept/Content-Type/Authorization headers, [Multipart], [Obsolete] - MethodSignatureGenerator: parameter aggregation (delegates to ParameterAggregator) - MethodGenerator: facade composing the three sub-generators Public API unchanged. All existing tests continue to work.
…r, and MethodSignatureGenerator - ReturnTypeGeneratorTests: 10 tests covering return type derivation, IApiResponse wrapping, Task/IObservable selection, file stream responses, response type override, IsApiResponseType - MethodAttributeGeneratorTests: 8 tests covering Accept/Content-Type/ Authorization headers, [Multipart], [Obsolete], and combinations - MethodSignatureGeneratorTests: 7 tests covering parameter aggregation, CancellationToken, dynamic querystring, Apizr RequestOptions
|
Warning Review limit reached
More reviews will be available in 29 minutes and 39 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1147 +/- ##
==========================================
+ Coverage 94.31% 94.38% +0.06%
==========================================
Files 48 52 +4
Lines 2796 2847 +51
==========================================
+ Hits 2637 2687 +50
- Misses 53 54 +1
Partials 106 106
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



Summary
Deepens the InterfaceGenerator module by extracting three focused generators, each independently testable. The public API is unchanged — all existing tests (2184) pass.
Changes
Module Structure
Testing
25 new unit tests across the three generators (ReturnTypeGeneratorTests, MethodAttributeGeneratorTests, MethodSignatureGeneratorTests). All 2184 existing tests pass unchanged.